/*
 * Copyright Radosław Smogura, 2012. All rights reserved.
 *
 * The content of this file is confidential and it is intelectual property
 * of copyright owners.
 * 
 *
 * $URL: http://reprap-ide.googlecode.com/svn/trunk/RepRapIDE/RepRapProject/src/main/java/eu/softper/reprap/project/nodes/STLFileNode.java $
 * $Id: STLFileNode.java 3 2012-11-19 10:58:30Z mail@smogura.eu $
 * $Revision: 3 $
 */
package eu.softper.reprap.project.nodes;

import eu.softper.reprap.project.RepRapProject;
import java.awt.Image;
import org.openide.filesystems.FileObject;
import org.openide.loaders.DataLoader;
import org.openide.loaders.DataObject;
import org.openide.loaders.DataObjectNotFoundException;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;

/**
 *
 * @author Radosław Smogura
 */
public class STLFileNode extends AbstractNode {
    private RepRapProject project;
    private FileObject file;
    private DataObject fileDo;
    
    public STLFileNode(RepRapProject project, FileObject file) {
        super(Children.LEAF);
        this.project = project;
        this.file = file;
        try {
            fileDo = DataObject.find(file);
        }catch(DataObjectNotFoundException dnfe) {
            throw new RuntimeException(dnfe);
        }
    }

    @Override
    public String getName() {
        return file.getNameExt();
    }

    @Override
    public String getDisplayName() {
        return file.getNameExt();
    }

//    @Override
//    public Image getIcon(int type) {
//        return Data
//    }
    
}
